//
//  ChatCellController.swift
//  Contract
//
//  Created by gaoyi on 2017/11/9.
//  Copyright © 2017年 gaoyi. All rights reserved.
//

import UIKit

class ChatCellController: UITableViewCell {

    
    
    @IBOutlet weak var pic: UIImageView!
    @IBOutlet weak var title: UITextView!

    
    var model:ChatModel!
        {
        didSet
        {
            title.text = "\(model.title as String)"
            pic.image = UIImage(named: model.pic as String)
        }
    }
    override func awakeFromNib() {
        super.awakeFromNib()
        // Initialization code
    }
    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        // Configure the view for the selected state
    }
    class func createCell(tableView:UITableView) ->ChatCellController
    {
        
        let arr : NSArray = Bundle.main.loadNibNamed("ChatCell", owner: nil, options: nil) as! NSArray
        
        let cell : ChatCellController = arr.firstObject as! ChatCellController
        
        return cell
    }
}
